<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // Promise.resolve
        // 将一个普通值, 转化为 promise 类型的数据
        //若参数为非 promise 对象, 则返回的结果为成功状态的 promise 对象
        // let p1 = Promise.resolve(123);
        // let p2 = Promise.resolve(undefined);

        //若参数为 promise 对象, 参数的状态决定返回结果的状态
        // let p3 = Promise.resolve(new Promise((resolve, reject) => {
        //     resolve('success');
        // }))
        let p4 = Promise.resolve(Promise.resolve(Promise.resolve("OK")));

        console.log(p4);


    </script>
</body>
</html>